<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>KimiAI 翻译与总结助手</title>
  <link rel="stylesheet" href="popup.css">
</head>
<body>
  <div class="container">
    <!-- 顶部导航栏 -->
    <header class="header">
      <nav class="nav-main">
        <div class="nav-tabs">
          <button class="tab-btn active" data-tab="translate">文本翻译</button>
          <button class="tab-btn" data-tab="summary">文本总结</button>
        </div>
        <button class="settings-btn" data-tab="settings">设置</button>
      </nav>
    </header>

    <!-- 主要内容区域 -->
    <main class="main-content">
      <!-- 文本翻译面板 -->
      <div class="panel active" id="translate-panel">
        <div class="input-area">
          <textarea id="translate-input" placeholder="在此输入或粘贴文本，或直接在页面上选择文本"></textarea>
        </div>
        <div class="result-area">
          <textarea id="translate-output" placeholder="翻译结果将显示在这里" readonly></textarea>
        </div>
        <div class="action-bar">
          <select id="target-language">
            <option value="en">英语</option>
            <option value="zh">中文</option>
            <option value="ja">日语</option>
            <option value="ko">韩语</option>
            <option value="fr">法语</option>
            <option value="de">德语</option>
          </select>
          <div class="buttons">
            <button id="translate-btn">翻译</button>
            <button id="copy-translate-btn">复制</button>
          </div>
        </div>
      </div>

      <!-- 文本总结面板 -->
      <div class="panel" id="summary-panel">
        <div class="input-area">
          <textarea id="summary-input" placeholder="在此输入或粘贴文本，或直接在页面上选择文本"></textarea>
        </div>
        <div class="result-area">
          <textarea id="summary-output" placeholder="总结结果将显示在这里" readonly></textarea>
        </div>
        <div class="action-bar">
          <select id="summary-model">
            <option value="moonshot-v1-8k">Moonshot-8K</option>
          </select>
          <div class="buttons">
            <button id="summarize-btn">总结</button>
            <button id="copy-summary-btn">复制</button>
          </div>
        </div>
      </div>

      <!-- 设置面板 -->
      <div class="panel" id="settings-panel">
        <div class="settings-form">
          <div class="form-group">
            <label for="api-url">API 地址</label>
            <input type="text" id="api-url" placeholder="输入API地址">
          </div>
          <div class="form-group">
            <label for="api-key">API Key</label>
            <input type="password" id="api-key" placeholder="输入API Key">
          </div>
          <div class="button-group">
            <button id="save-settings">保存</button>
            <button id="cancel-settings">取消</button>
            <button id="reset-settings">重置</button>
          </div>
        </div>
      </div>
    </main>
  </div>

  <script type="module" src="popup.js"></script>
</body>
</html> 